public class String[]
extends Object
GDK enhancements for String[].
| Type Params | Return Type | Name and description |
|---|---|---|
|
public Process |
execute()Executes the command specified by the given String array.
|
|
public Process |
execute(String[] envp, File dir)Executes the command specified by the String array given in the first parameter,
with the environment defined by envp and under the working directory dir.
|
|
public Process |
execute(List envp, File dir)Executes the command specified by the String array given in the first parameter,
with the environment defined by envp and under the working directory dir.
|
|
public Process |
execute(Map<String, Object> options)Executes the command specified by the given String array with options
provided as named parameters. |
|
public ProcessBuilder |
toProcessBuilder()Creates a ProcessBuilder from a command array. |
| Methods inherited from class | Name |
|---|---|
class Object |
addShutdownHook, any, any, asBoolean, asType, collect, collect, collect, dump, each, eachMatch, eachMatch, eachWithIndex, every, every, find, find, findAll, findAll, findIndexOf, findIndexOf, findIndexValues, findIndexValues, findLastIndexOf, findLastIndexOf, findResult, findResult, findResult, findResult, getAt, getMetaClass, getMetaPropertyValues, getProperties, grep, grep, hasProperty, identity, inject, inject, inspect, invokeMethod, is, isCase, isNotCase, iterator, metaClass, print, print, printf, printf, println, println, println, putAt, respondsTo, respondsTo, setMetaClass, sleep, sleep, split, sprintf, sprintf, stream, tap, toString, use, use, use, with, with, withCloseable, withCloseable, withMethodClosure, withStream, withStream, withTraits |
Executes the command specified by the given String array.
The first item in the array is the command; the others are the parameters.
For more control over Process construction you can use
java.lang.ProcessBuilder.
Executes the command specified by the String array given in the first parameter,
with the environment defined by envp and under the working directory dir.
The first item in the array is the command; the others are the parameters.
For more control over Process construction you can use
java.lang.ProcessBuilder.
envp - an array of Strings, each member of which
has environment variable settings in the format
name=value, or
null if the subprocess should inherit
the environment of the current process.dir - the working directory of the subprocess, or
null if the subprocess should inherit
the working directory of the current process. Executes the command specified by the String array given in the first parameter,
with the environment defined by envp and under the working directory dir.
The first item in the array is the command; the others are the parameters.
For more control over Process construction you can use
java.lang.ProcessBuilder.
envp - a List of Objects (converted to Strings using toString), each member of which
has environment variable settings in the format
name=value, or
null if the subprocess should inherit
the environment of the current process.dir - the working directory of the subprocess, or
null if the subprocess should inherit
the working directory of the current process. Executes the command specified by the given String array with options
provided as named parameters.
options - a Map of options to configure the process (see String.execute)Creates a ProcessBuilder from a command array.